import service from '@/utils/request'

// @Tags Attribute
// @Summary 创建Attribute
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.Attribute true "创建Attribute"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /attribute/createAttribute [post]
export const createAttribute = (data) => {
  return service({
    url: '/attribute/createAttribute',
    method: 'post',
    data
  })
}

// @Tags Attribute
// @Summary 删除Attribute
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.Attribute true "删除Attribute"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}"
// @Router /attribute/deleteAttribute [delete]
export const deleteAttribute = (data) => {
  return service({
    url: '/attribute/deleteAttribute',
    method: 'delete',
    data
  })
}

// @Tags Attribute
// @Summary 删除Attribute
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body request.IdsReq true "批量删除Attribute"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}"
// @Router /attribute/deleteAttribute [delete]
export const deleteAttributeByIds = (data) => {
  return service({
    url: '/attribute/deleteAttributeByIds',
    method: 'delete',
    data
  })
}

// @Tags Attribute
// @Summary 更新Attribute
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.Attribute true "更新Attribute"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"更新成功"}"
// @Router /attribute/updateAttribute [put]
export const updateAttribute = (data) => {
  return service({
    url: '/attribute/updateAttribute',
    method: 'put',
    data
  })
}

// @Tags Attribute
// @Summary 用id查询Attribute
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data query model.Attribute true "用id查询Attribute"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"查询成功"}"
// @Router /attribute/findAttribute [get]
export const findAttribute = (params) => {
  return service({
    url: '/attribute/findAttribute',
    method: 'get',
    params
  })
}

// @Tags Attribute
// @Summary 分页获取Attribute列表
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data query request.PageInfo true "分页获取Attribute列表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /attribute/getAttributeList [get]
export const getAttributeList = (params) => {
  return service({
    url: '/attribute/getAttributeList',
    method: 'get',
    params
  })
}
